All Questions
5 questions
2votes
1answer
877views
Why use tuples as function parameters in languages that support currying?
In languages that support currying, I can't think of many cases where using a tuple as function input parameters would be better than breaking the tuple apart into multiple parameters, which then ...
41votes
12answers
9kviews
Why do most programming languages have special keyword or syntax for declaring functions? [closed]
Most programming languages (both dynamically and statically typed languages) have special keyword and/or syntax that looks much different than declaring variables for declaring functions. I see ...
20votes
1answer
14kviews
Passing a Scala function to a Java 8 method
The following Scala code works and can be passed to a Java method expecting a function. Is there a cleaner way to do this? Here's my first pass: val plusOne = new java.util.function.Function[Int,...
0votes
1answer
748views
The idea of functionN in Scala / Functionaljava
From brain driven development It turns out, that every Function you’ll ever define in Scala, will become an instance of an Implementation which will feature a certain Function Trait. There ...
6votes
3answers
1kviews
Functional Methods on Collections
I'm learning Scala and am a little bewildered by all the methods (higher-order functions) available on the collections. Which ones produce more results than the original collection, which ones ...